package cn.jbit.oa136.biz.impl;

import java.util.List;

import cn.jbit.oa136.biz.EmployeeBiz;
import cn.jbit.oa136.dao.EmployeeDao;
import cn.jbit.oa136.pojo.Employee;

public class EmployeeBizImpl implements EmployeeBiz{

	private EmployeeDao employeeDao;
	
	
	public void setEmployeeDao(EmployeeDao employeeDao) {
		this.employeeDao = employeeDao;
	}


	public Employee login(String sn, String password) {		
		Employee emp =this.employeeDao.findBySn(sn);	
		return emp;	
	}


	public Employee login(Employee employee) {	
		List list =this.employeeDao.getEmployee(employee);		
		if(list.size()==1){
			return (Employee)list.get(0);
		}else{
			return null;
		}
	}

}
